package com.itheima.DeptDao.impl;

import com.itheima.DeptDao.DeptDao;
import org.apache.commons.io.IOUtils;
import org.springframework.stereotype.Component;


import java.io.InputStream;
import java.util.List;
@Component
public class DeptDaoimpl implements DeptDao {
    @Override
    public List<String> list() {
        InputStream is = this.getClass().getClassLoader().getResourceAsStream("dept.txt");
        return IOUtils.readLines(is, "UTF-8");
    }
}
